<template>
    <section>
        <div style="text-align:center;">
            <div id='print' v-if="!loading" style='width:930px;   margin: auto'>
                <!--startprint-->
                <h2>杭州穿否电子商务有限公司生产报价单</h2>
                <!--endprint-->

                <table class="tp tb1">

                    <tbody>
                        <tr>
                            <th style="width:10%">客户</th>
                            <td style="width:23%">

                                <span v-text="currObj.customerName"></span>
                            </td>
                            <th style="width:10%">款号</th>

                            <td style="width:23%">
                                <span v-text="currObj[flowClassId].modelNo"></span>
                            </td>
                            <th style="width:10%">下单日期</th>
                            <td style="width:23%">
                                <span v-text="fmtDate(currObj.createTime)"></span>
                            </td>
                        </tr>
                        <tr>
                            <th rowspan="5"></th>
                            <td rowspan="5">
                                <img :src="currObj.imgUrl" style='width:100%' alt="">

                            </td>
                            <th>销售</th>
                            <td>
                                <span v-for="member in currObj.salesMembers" v-text="member.name"></span>
                            </td>
                            <th>报价日期</th>
                            <td>
                                <span v-text="fmtDate()"></span>
                            </td>
                        </tr>
                        <tr>

                            <th>联系方式</th>
                            <td><span v-text="memberTell"></span></td>
                            <td> <input v-model="currObj[flowClassId].print.baojiadan.memoArray[0].key" type="text"></td>
                            <td> <input v-model="currObj[flowClassId].print.baojiadan.memoArray[0].value" type="text"></td>
                        </tr>
                        <tr>

                            <th> <input v-model="currObj[flowClassId].print.baojiadan.memoArray[1].key" type="text"></th>
                            <td> <input v-model="currObj[flowClassId].print.baojiadan.memoArray[1].value" type="text"></td>
                            <th> <input v-model="currObj[flowClassId].print.baojiadan.memoArray[2].key" type="text"></th>
                            <td> <input v-model="currObj[flowClassId].print.baojiadan.memoArray[2].value" type="text"></td>
                        </tr>
                        <tr>

                            <th><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[3].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[3].value"></td>
                            <th><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[4].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[4].value"></td>
                        </tr>
                        <tr>

                            <th><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[5].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[5].value"></td>
                            <th><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[6].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[6].value"></td>
                        </tr>
                        <tr>
                            <th><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[7].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[7].value"></td>
                            <th><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[8].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[8].value"></td>
                            <th><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[9].key"></th>
                            <td><input type="text" v-model="currObj[flowClassId].print.baojiadan.memoArray[9].value"></td>
                        </tr>
                    </tbody>
                </table>

                <div v-if="currObj[flowClassId].t100">
                    <template v-if="currObj[flowClassId].t100.length>0">
                        <h2>面辅料</h2>
                        <table class='tp'>
                            <thead>
                                <tr>
                                    <th style="width:200px">名称</th>
                                    <th>编码</th>
                                    <th>门幅</th>
                                    <th>单件用量</th>
                                    <th style="width:80px">单位</th>
                                    <th style="width:80px">单价</th>
                                    <th style="width:80px">小计</th>

                                </tr>

                            </thead>
                            <tbody>
                                <tr v-for="(item,index) in currObj[flowClassId].t100">
                                    <td>
                                        <span v-text="item.name">1231</span>
                                    </td>
                                    <td>
                                        <span v-text="item.code"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.menfu"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.num"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.unitId"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.price"></span>
                                    </td>
                                    <td>
                                        <span v-text="item.amount"></span>
                                    </td>
                                </tr>

                            </tbody>
                            <tfoot>
                                <tr>
                                    <th colspan="5"></th>
                                    <th>小计</th>
                                    <td>
                                        <span v-text="amount100"></span>
                                    </td>
                                </tr>
                            </tfoot>
                        </table>
                    </template>
                </div>
                <div v-if="currObj[flowClassId].t200">
                    <h2>加工费/其他费用</h2>
                    <table class='tp'>
                        <thead>
                            <tr>
                                <th style="width:200px">名称</th>
                                <th>备注</th>
                                <th style="width:80px">数量</th>
                                <th style="width:80px">单价</th>
                                <th style="width:80px">小计</th>


                            </tr>

                        </thead>
                        <tbody>
                            <tr v-for="(item,index) in currObj[flowClassId].t200.detail2">
                                <td>
                                    <span v-text="item.wageClass.name"></span>
                                </td>
                                <td>
                                    <span v-text="item.memo"></span>
                                </td>
                                <td>
                                    <span v-text="item.num"></span>
                                </td>
                                <td>
                                    <span v-text="item.price"></span>
                                </td>
                                <td>
                                    <span v-text="item.amount"></span>
                                </td>

                            </tr>

                        </tbody>
                        <tfoot>
                            <tr>
                                <th colspan="3"></th>
                                <th>小计</th>
                                <td>
                                    <span v-text="amount200_2"></span>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
                <!--<h2>合计工价</h2>
                <table class='tp'>
                    <thead>
                        <tr>
                            <th style="width:200px">名称</th>
                            <th>备注</th>
                            <th style="width:80px">数量</th>
                            <th style="width:80px">单价</th>
                            <th style="width:80px">小计</th>


                        </tr>

                    </thead>
                    <tbody>
                        <tr v-for="(item,index) in currObj[flowClassId].t200.detail">
                            <td>
                                <span v-text="item.wageClass.name"></span>
                            </td>
                            <td>
                                <span v-text="item.memo"></span>
                            </td>
                            <td>
                                <span v-text="item.num"></span>
                            </td>
                            <td>
                                <span v-text="item.price"></span>
                            </td>
                            <td>
                                <span v-text="item.amount"></span>
                            </td>

                        </tr>

                    </tbody>
                    <tfoot>
                        <tr>
                            <th colspan="3"></th>
                            <th>小计</th>
                            <td>
                                <span v-text="amount200_1"></span>
                            </td>
                        </tr>
                    </tfoot>
                </table>-->
                <div>
                    <h2>合计费用</h2>
                    <table class='tp'>
                        <thead>
                            <tr>
                                <th style="width:200px">名称</th>
                                <th>备注</th>
                                <th style="width:80px">数量</th>
                                <th style="width:80px">单价</th>
                                <th style="width:80px">小计</th>


                            </tr>

                        </thead>
                        <tbody>
                            <tr v-for="(item,index) in countList">
                                <td>
                                    <span v-text="item.name"></span>
                                </td>
                                <td>
                                    <span v-text="item.memo"></span>
                                </td>
                                <td>
                                    <span v-text="item.num"></span>
                                </td>
                                <td>
                                    <span v-text="item.price"></span>
                                </td>
                                <td>
                                    <span v-text="item.amount"></span>
                                </td>

                            </tr>

                        </tbody>
                        <tfoot>
                            <tr>
                                <th colspan="3"></th>
                                <th>小计</th>
                                <td>
                                    <span v-text="amount"></span>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>
            </div>
        </div>
       <iframe id='ifm' src="/public/print.html" class="ifm_print" frameborder="0"></iframe>
    </section>
</template>
<script src="./offerPrint.js">

</script>
<style lang="scss" scoped>
    table.tb1 thead,
    table.tb1 thead tr td,
    table.tb1 thead tr th {

        border: none;
    }
</style>